<?
use WID\Test\Matchers as Matchers;

return array(
	'name'=>'toBeDefined', 
	
	'each'=> array(
		'matcher'=>null
	),
	
	'beforeEach'=>function(&$each) {
		$each['matcher'] = new Matchers\toBeDefined();
	}, 
	
	'tests'=>array(
		'match'=>function(&$each) {
			$m = $each['matcher'];
			$this->expect($m->match('test',false,null))->toBeTrue(); // prawdziwy
			$this->expect($m->match(null,true,null))->toBeTrue(); // zanegowny prawdziwy
			$this->expect($m->match('test',true,null))->toBeFalse(); // zanegowany nieprawdziwy
		},
		
		'getInfo'=>function(&$each) {
			$this->expect($each['matcher']->getInfo(null,false,null))->toBe('null to be defined');
			$this->expect($each['matcher']->getInfo('test',true,null))->toBe('"test" not to be defined');
		},
		
		'getName'=>function(&$each) {
			$this->expect($each['matcher']->getName())->toBe('toBeDefined');
		}
		
	)
);
?>